package com.example.leetcode.theory.bean.person;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @Description TODO
 * @ClassName MyBeanPostProcessor
 * @Author Administrator
 * @Date 2020/5/19 15:54
 * @Version 1.0.0
 */
public class MyBeanPostProcessor implements BeanPostProcessor {

    public MyBeanPostProcessor() {
        super();
        System.out.println("[3]这是BeanPostProcessor实现类构造器！！");
    }

    @Override
    public Object postProcessBeforeInitialization(Object arg0, String arg1)
            throws BeansException {
        System.out.println("[7]BeanPostProcessor接口方法postProcessBeforeInitialization对属性进行更改！");
        return arg0;
    }

    @Override
    public Object postProcessAfterInitialization(Object arg0, String arg1)
            throws BeansException {
        System.out.println("[8]BeanPostProcessor接口方法postProcessAfterInitialization对属性进行更改！");
        return arg0;
    }
}
